package caffeine;

import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;

/**
 * @author brianxia
 * @version 1.0
 * @date 2022-10-25 9:35
 */
public class Test {

    public static void main(String[] args) {
        Cache<String, String> cache = Caffeine.newBuilder().build();

        cache.put("123","456");
        cache.put("a","b");

        System.out.println( cache.getIfPresent("123"));
        System.out.println( cache.getIfPresent("a"));
        System.out.println( cache.getIfPresent("b"));


    }
}
